<?php



$files = glob("foto/*.*");

 

$colCnt=0;

echo '<table border="0" style="width:10px;">';

 

for ($i=1; $i<count ($files); $i++)

{

$colCnt++;

if ($colCnt==1)

echo '<tr>';

echo '<td width="10%" style="font-size:2px; font-family:arial">';

 

$num = $files[$i];

echo '<img src="'.$num.'" align="absmiddle" width=80 height=80 border=3/> ';

print substr(substr($num,6,100),0,-4);

 

echo '</td>';

 

if ($colCnt==4)

{

echo '';

$colCnt=0;

}

}

 

echo 'teste';

?>